Stocks Performance Using library(dygraphs)

getSymbols(c("CXW", "F", "GM", "JCP", "KR", "WDC", "NKE","T", "WDAY", "WFC", "WMT"))
## 'getSymbols' currently uses auto.assign=TRUE by default, but will
## use auto.assign=FALSE in 0.5-0. You will still be able to use
## 'loadSymbols' to automatically load data. getOption("getSymbols.env")
## and getOption("getSymbols.auto.assign") will still be checked for
## alternate defaults.
## 
## This message is shown once per session and may be disabled by setting 
## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## Warning: NKE download failed; trying again.
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
##  [1] "CXW"  "F"    "GM"   "JCP"  "KR"   "WDC"  "NKE"  "T"    "WDAY" "WFC" 
## [11] "WMT"
tickers_today <- c("CXW", "F", "GM", "JCP", "KR", "WDC", "NKE","T", "WDAY", "WFC", "WMT")
getSymbols(tickers_today)
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
## pausing 1 second between requests for more than 5 symbols
##  [1] "CXW"  "F"    "GM"   "JCP"  "KR"   "WDC"  "NKE"  "T"    "WDAY" "WFC" 
## [11] "WMT"
K <- do.call(merge, lapply(tickers_today, function(x) Cl(get(x))))
dateWindow <- c("2015-06-26", "2020-06-06")
dygraph(K, main = "Stock Performances (2015-2020)",xlab="Periods",ylab="Stock Prices") %>%
  dyRangeSelector(dateWindow = dateWindow) %>% dyShading(from = "2019-1-1", to = "2020-3-12", color = "#CCEBD6") %>% dyOptions(stackedGraph = TRUE) %>%
  dyRangeSelector(height = 20) %>% dyLegend(width = 400)

Stocks Performance Using library(ggplot2)

t<-tq_get(c("CXW", "F", "GM", "JCP", "KR", "WDC", "NKE","T", "WDAY", "WFC", "WMT"),get="stock.prices",from="2015-06-26", to="2020-06-26")
t$volume<-t$volume/100000

   p<-ggplot(t) +
    geom_col(aes(date,volume,group=close,col=symbol),size=2)+theme_bw()+geom_line(aes(date,close))+
    labs(title = "Volume Sold and Stock Prices (2015-2020)",y="Volume (in millions",x="Periods")+facet_wrap(~symbol)
   ggplotly(p, tooltip=c("close","date","volume"))
## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.

Summary

In analyzing the Volume Sold and Stock Prices graphs, the conclusion of how investors would choose their strategies is apparent. Historical data shows frequently sold stocks are better to invest in due to potential good returns.Using a bar graph combined with line graph to visualize the amount of stocks sold compared to closing stock prices for the day gives a clear idea of expected return amount. The five years of information that was used gives an idea of how to predict these trends. It shows that in most cases, there is a positive relationships between the stock price and the volume of shares traded.